package com.TwinBlade.PicturePassword;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;

public class SetupWizard extends Activity
  implements View.OnClickListener
{
  private SharedPreferences a;
  private SetupWizardViewFlipper b;
  private Button c;
  private Button d;
  private Button e;

  private void a()
  {
    this.b.setInAnimation(this, 2130968579);
    this.b.setOutAnimation(this, 2130968580);
    this.b.showNext();
    if (this.b.getDisplayedChild() == 3)
      this.d.setEnabled(false);
  }

  protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
  {
    super.onActivityResult(paramInt1, paramInt2, paramIntent);
    switch (paramInt1)
    {
    default:
      return;
    case 0:
      if (paramInt2 == -1)
      {
        a();
        return;
      }
      Utilities.a(this, getString(2131296455), 4, true);
      return;
    case 1:
      if (paramInt2 == -1)
      {
        a();
        return;
      }
      Utilities.a(this, getString(2131296456), 4, true);
      return;
    case 2:
      if (paramInt2 == -1)
      {
        a();
        return;
      }
      Utilities.a(this, getString(2131296457), 4, true);
      return;
    case 3:
    }
    if (paramInt2 == -1)
    {
      this.d.setEnabled(true);
      return;
    }
    Utilities.a(this, getString(2131296458), 4, true);
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
    case 2131230776:
      do
      {
        return;
        if (this.b.getDisplayedChild() == 0)
        {
          Utilities.a(this, getString(2131296453), 3, true);
          if (bd.a(this));
          for (Intent localIntent3 = new Intent(this, GesturePreferencesPlus.class); ; localIntent3 = new Intent(this, GesturePreferences.class))
          {
            startActivityForResult(localIntent3, 0);
            return;
          }
        }
        if (this.b.getDisplayedChild() != 1)
          break;
      }
      while (!Utilities.a(false, false));
      Utilities.a(this, getString(2131296454), 3, true);
      startActivityForResult(new Intent(this, Image.class), 1);
      return;
      if (this.b.getDisplayedChild() == 2)
      {
        Intent localIntent1 = new Intent(this, SaveActivity.class);
        localIntent1.putExtra("Code", "Save");
        startActivityForResult(localIntent1, 2);
        return;
      }
      if (this.b.getDisplayedChild() == 3)
      {
        Intent localIntent2 = new Intent(this, SaveActivity.class);
        localIntent2.putExtra("Code", "Test");
        startActivityForResult(localIntent2, 2);
        return;
      }
      if (this.b.getDisplayedChild() == 4)
      {
        startService(new Intent(this, AService.class));
        Utilities.a(this, getString(2131296449), 3, true);
        this.a.edit().putBoolean("MainEnabled", true).commit();
        this.a.edit().putBoolean("ShowSetupWizard", false).commit();
        finish();
        return;
      }
      a();
      return;
    case 2131230775:
      if (this.b.getDisplayedChild() == 0)
      {
        this.a.edit().putBoolean("ShowSetupWizard", false).commit();
        finish();
        return;
      }
      this.b.setInAnimation(this, 2130968578);
      this.b.setOutAnimation(this, 2130968581);
      this.b.showPrevious();
      this.d.setEnabled(true);
      return;
    case 2131230746:
    }
    startActivityForResult(new Intent(this, SetupPIN.class), 3);
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903049);
    this.b = ((SetupWizardViewFlipper)findViewById(2131230763));
    this.a = PreferenceManager.getDefaultSharedPreferences(this);
    this.d = ((Button)findViewById(2131230776));
    this.c = ((Button)findViewById(2131230775));
    this.e = ((Button)findViewById(2131230746));
    this.d.setOnClickListener(this);
    this.c.setOnClickListener(this);
    this.e.setOnClickListener(this);
    CheckBox localCheckBox1 = (CheckBox)findViewById(2131230770);
    localCheckBox1.setChecked(this.a.getBoolean("ForegroundService", true));
    localCheckBox1.setOnCheckedChangeListener(new cq(this));
    CheckBox localCheckBox2 = (CheckBox)findViewById(2131230772);
    localCheckBox2.setChecked(this.a.getBoolean("EasyWake", true));
    localCheckBox2.setOnCheckedChangeListener(new cr(this));
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.TwinBlade.PicturePassword.SetupWizard
 * JD-Core Version:    0.6.2
 */